package com.reading_recognition_system.service.impl;

import com.reading_recognition_system.mapper.ErrorMapper;
import com.reading_recognition_system.pojo.Error;
import com.reading_recognition_system.service.ErrorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ErrorServiceImpl implements ErrorService {
    @Autowired
    private ErrorMapper errorMapper;
    @Override
    public List<Error> findAllError() {
        return errorMapper.findAllError();
    }

    @Override
    public Integer deleteAllError() {
        Integer flag=0;
        flag=errorMapper.deleteAllError();
        return flag;
    }

    @Override
    public Integer insertError(Error error) {
        Integer flag=0;
        flag=errorMapper.insertError(error);
        return flag;
    }

    @Override
    public Integer deleteOneError(int e_id) {
        Integer flag=0;
        flag=errorMapper.deleteOneError(e_id);
        return flag;
    }

}
